/**
  ****************************************************************************************************
  * @file    main.c
  * @author  FMSH Application Team
  * @brief   Header file of FL Module
  ****************************************************************************************************
  * @attention
  *
  * Copyright (c) [2021] [Fudan Microelectronics]
  * THIS SOFTWARE is licensed under Mulan PSL v2.
  * can use this software according to the terms and conditions of the Mulan PSL v2.
  * You may obtain a copy of Mulan PSL v2 at:
  *          http://license.coscl.org.cn/MulanPSL2
  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 
  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 
  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  * See the Mulan PSL v2 for more details.
  *
  ****************************************************************************************************
  */

#include "main.h"
#include "fm33_assert.h"



/**    
* Chip Series: FM33LC0xx;
* FL Version: v2.3;
* Project Name: dma-tim5;
* Project Version: v2.3.0.0;
* Project ID: 1583261189679353857;
* Create Date: 2022-10-21;
*/

  
int main(void)
{
    /* Initialize FL Driver Library */
    FL_Init();

    /* Configure the system clock */
    MF_Clock_Init();
    
   
    /* Initialize all configured peripherals */
    MF_Config_Init();
    ledInit();
    //FL_GPTIM_Enable(GPTIM0);

    while(1)
    {     
        setAllColor_RGB(255,0,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,255,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,255);
        show();
        FL_DelayMs(500);
        
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(0,0,0,255);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(1,0,0,255);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(2,0,0,255);
        show();
        FL_DelayMs(500);
        
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(0,0,255,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(1,0,255,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(2,0,255,0);
        show();
        FL_DelayMs(500);
        
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(0,255,0,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(1,255,0,0);
        show();
        FL_DelayMs(500);
        setAllColor_RGB(0,0,0);
        setPixeColor_RGB(2,255,0,0);
        show();
        FL_DelayMs(500);

    }

}


